package org.shanyu.tide.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.shanyu.tide.exception.BizException;
import org.shanyu.tide.model.RedEnvelop;
import org.shanyu.tide.model.vo.LoginBean;
import org.shanyu.tide.service.HrService;
import org.shanyu.tide.service.RedEnvelopService;
import org.shanyu.tide.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.naming.AuthenticationException;
import javax.servlet.http.HttpServletRequest;

@RestController
@Api(tags = "认证相关接口")
@RequestMapping("/RedEnvelop")
public class RedEnvelopController {

    @Autowired
    RedEnvelopService redEnvelopService;

    @ApiOperation("派发红包接口")
    @PostMapping("/AddRedEnvelop")
    public JsonResult<String> AddRedEnvelop(@RequestBody RedEnvelop redEnvelop) throws Exception {
        return this.redEnvelopService.AddRedEnvelop(redEnvelop);
    }

}
